#include<iostream>
using namespace std;
int n, k;
int ans;
void dfs(int sum, int cnt, int last)
{
	if (cnt == k) {
		if (sum <= 0) {
			if (sum == 0) {
				ans++;
			}
		}
		return;
	}
	for (int i = last; i <= sum; i++) {
		dfs(sum - i, cnt + 1, i);
	}
}
int main()
{
	cin >> n >> k;
	dfs(n, 0, 1);
	cout << ans << endl;
	return 0;
}